package com.xingshang.utils;

/**
 * 统一返回结果状态信息类
 */
public enum ResultCodeEnum {

    SUCCESS(200, "成功"),
    USERNAME_ERROR(501, "用户名错误"),
    PASSWORD_ERROR(503, "密码错误"),
    NOTLOGIN(504, "未登录"),
    USERNAME_USED(505, "用户名被占用"),
    NULL_DATA(506, "nullData"),
    DELETE_PLAYLIST_FAIL(507, "删除歌曲失败"),
    PLAYLIST_EXIST(508, "歌曲已存在"),
    HTTP_REQUEST_ERROR(509, "http请求错误" ),
    PARSE_ERROR(510, "解析错误"),
    SYSTEM_ERROR(511, "系统错误"), UPDATE_ERROR(512, "更新失败"),
    NOT_LIKE(513, "未喜欢"), 
    UPLOAD_NOT_FOUND(514, "上传未找到"), 
    UNAUTHORIZED(515, "未授权"), 
    PROCESSING(516, "处理中"), 
    FILE_EMPTY(517, "文件为空"), INVALID_FILE_TYPE(518, "文件类型错误"), UPLOAD_FAILED(519, "上传失败");

    private Integer code;
    private String message;

    private ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
